package com.info.zhiduoduo.core.service;

import com.info.zhiduoduo.core.vo.entrustmentproject.ImportResultVO;
import com.info.zhiduoduo.repository.entity.company.Company;
import com.info.zhiduoduo.repository.entity.entrustmentproject.EntrustmentProject;
import com.info.zhiduoduo.repository.entity.entrustmentproject.EntrustmentProjectItem;

import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface CoreEntrustProjectServcie {

	void refreshProjectStatus(int importId);

	/**
	 * 处理项目金额，从委托主体资金记账本转账到受托方（创客）资金记账本
	 */
	void processProjectPrincipalTransfer2Trustee(List<EntrustmentProjectItem> list);

	/**
	 * 计算每个子项目的税费
	 *
	 * @param item
	 * @param company
	 * @param serviceRate 委托接单项目需要手动指定服务费率，创客团项目不需要
	 * @param projectType
	 */
	void calculateItemAmount(EntrustmentProjectItem item, Company company, Double serviceRate, int projectType);

	void calcProjectTotalAmount(EntrustmentProject entrustmentProject);

	void calcProjectTotalAmount(EntrustmentProject entrustmentProject, List<EntrustmentProjectItem> itemList);

	/**
	 * @param item
	 * @param calcAmountType 计算的项目金额类型, 取值于 {@link com.info.zhiduoduo.common.constants.project.CalcAmountType}
	 */
	void calcMakerGouponZhiduoduoAmount(EntrustmentProjectItem item, int calcAmountType);

	/**
	 * @param item
	 * @param calcAmountType 计算的项目金额类型, 取值于 {@link com.info.zhiduoduo.common.constants.project.CalcAmountType}
	 */
	void calcMakerGroupCrowdsourceAmount(EntrustmentProjectItem item, int calcAmountType);

	/**
	 * 委托接单项目转账失败 发送通知
	 */
	void handleTransferFailed(Integer projectItemId);
}
